<!DOCTYPE html>
<html class="bg-gray">
    <head>
        <meta charset="UTF-8">
        <title>登录-${Application.systemName!}</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- bootstrap 3.0.2 -->
        <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <!-- font Awesome -->
        <link href="css/font-awesome.min.css" rel="stylesheet" type="text/css" />
        <!-- Theme style -->
        <link href="css/AdminLTE.css" rel="stylesheet" type="text/css" />
		<!-- main.css -->
		<link rel="stylesheet" type="text/css" href="css/main.css"/>
      	
    </head>
    <body class="bg-gray">
        <div class="form-box" id="login-box">
            <div style="background: white; color: black; margin-bottom: -10px;" class="header">
            	<img style="width: 50px; height: 50px;" src="img/login_09.jpg"/>
            	<div style="margin-top: 10px; font-size: 18px;">后台管理系统登录</div>
            </div>
            <form id="loginForm">
                <div class="body bg-white">
                	<div class="form-group">
                		<div class="input-group">
		                    <span class="input-group-addon"><i class="iconfont">&#xe6f5;</i></span>
		                    <input type="text" name="loginCode" class="form-control" placeholder="用户名/邮箱">
	                    </div>
                	</div>
                    <div class="form-group">
                        <div class="input-group"> 
		                    <span class="input-group-addon" style="padding: 8px 15px"><i class="fa fa-unlock-alt" style="font-size:15px"></i></span> 
		                    <input type="password" name="password" class="form-control" placeholder="密码">
	                    </div>
                    </div> 
                </div>
                <div class="footer">                                                               
                    <button type="button" class="btn bg-blue btn-block">登录</button>
                </div>
            </form>
        </div>
        
        <!-- jQuery 2.0.2 -->
        <script src="js/jquery.min.js"></script>
        <script src="js/jquery.form.min.js"></script>
        <!-- Bootstrap -->
        <script src="js/bootstrap.min.js" type="text/javascript"></script>        
        <script type="text/javascript">
        $(document).ready(function(){
        	  $("button").click(function(){ 
        		  $("#loginForm").ajaxSubmit({  
      	            type : "POST",  
      	            url : "validate",   
      	            dataType : "json",  
      	            contentType : 'application/x-www-form-urlencoded; charset=UTF-8',  
      	            success : function(map) {  
      	                if(map.body=="success"){
      	                	window.location.href="index";
      	                }else{
      	                	alert(map.body);
      	                }
      	            },  
      	            error : function(map) {  
      	                alert("出现错误，请刷新页面");  
      	            }  
      	  
      	        }) 
        	  });
        	});
       
        </script>
    </body>
</html>